const webpack = require('webpack')
const webpackDevServer = require('webpack-dev-server')
const config = require('../config/webpack.config.js')

const options = {
  contentBase: './dist',
  hot: true,
  host: 'localhost'
}
webpackDevServer.addDevServerEntrypoints(config, options)

const compilre = webpack(config)
const server = new webpackDevServer(compilre, options)

server.listen(5000, 'localhost', () => {
  console.log('dev server listening on port 5000');
});
